﻿using Application.AppService.EMRAppService;
using AutoMapper;
using Microsoft.AspNetCore.Mvc;

namespace UI.Controllers.RecruitmentManagement_招聘管理_.Post_Publication_Management_职位发布管理_
{
	public class EMRSSController : Controller
	{
		private readonly IEMRAppService emrAppService;
		private readonly IMapper mapper;

		public EMRSSController(IEMRAppService emrAppService, IMapper mapper)
		{
			this.emrAppService = emrAppService;
			this.mapper = mapper;
		}
		public IActionResult Index()
		{
			return View();
		}
		[HttpPost("GetChancess")]
		public IActionResult GetChances(int page, int pageSize)
		{
			var totalRecords = emrAppService.GetCount(); // 获取数据总量
			var chances = emrAppService.GetList(page, pageSize);

			return Json(new { TotalRecords = totalRecords, Chances = chances });
		}
	}
}
